package com.careerraiser.child;

public class ComparableDog extends Dog implements Comparable<ComparableDog> {

	public ComparableDog(String string,int dognum) {
		super(string);
		this.dognumber=dognum;
	}
    int dognumber =0;
	@Override
	public int compareTo(ComparableDog o) {
		//return this.getName().compareTo(o.getName());
		if(this.dognumber<o.dognumber)
			return -1;
		else if (this.dognumber==o.dognumber)
			return 0;
		else
			return 1;
	}

}
